/*
made in liguang.tang

此类是管理每张卡牌view类

*/


package view.UIlayer
{
	import config.Config;
	
	import flash.display.Loader;
	import flash.display.Sprite;
	import flash.net.URLRequest;
	
	import vo.CardVo;
	public class CardView extends Sprite
	{
		public var _cardVO:CardVo;
		private var loader:Loader;
		
		public function CardView( vo:CardVo )
		{					
			_cardVO = vo;
			init();
		}		
	
		public function init( ) : void {			
			var tmpLoader : Loader = new Loader( );
//			根据传进来的cardVO.id判断从XML里取那张牌（@id == cardVO.id）						
			var tmpSource :String = Config.assetsXML.card.( @id == _cardVO.id ).@source;			
			tmpLoader.load(new URLRequest(tmpSource));
			addChild(tmpLoader);
		} 
	}
}